<?php
include("connect.php");
$UserID=$_REQUEST['UserID'];
$sql="SELECT Activities.ActID,Activities.ActName FROM Activities,Contact WHERE Activities.ActID=Contact.ActID AND Contact.UserID='".$UserID."'";
//$sql="SELECT * FROM Users WHERE UserId='".$uid."'";
//$sql="SELECT * FROM Users WHERE UserId='".$uid."'";
mysqli_query($conn,"set names utf8mb4");
$result=mysqli_query($conn,$sql);
$data=Array();
class activity{
	public $ActID;
	public $ActName;
}
while($row=mysqli_fetch_array($result,MYSQL_ASSOC)){
	$act=new activity();
	$act->ActID=urlencode($row["ActID"]);
	$act->ActName=urlencode($row["ActName"]);
	$data[]=$act;
}


$json=json_encode($data);
echo urldecode($json);
?>
